//
//  LXInsuranceListTableViewCell.m
//  ZuLinProject
//
//  Created by bancheng on 2022/9/21.
//  Copyright © 2022 LX_App. All rights reserved.
//

#import "LXInsuranceListTableViewCell.h"
#import "LXInsuranceModel.h"
@implementation LXInsuranceListTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    [self.backView addCorner:5];
}

- (void)setModel:(LXInsuranceModel *)model{
    _model =  model;
    
    self.label1.text = model.carNum;
    self.label3.text = [NSString stringWithFormat:@"开始时间 %@",model.compulsoryBeginTime];
    [self.label3 addAttributes:TextAttrCorlor(Color333) forString:model.compulsoryBeginTime];
    self.label4.text = [NSString stringWithFormat:@"结束时间 %@",model.compulsoryEndTime];
    [self.label4 addAttributes:TextAttrCorlor(Color333) forString:model.compulsoryEndTime];
    
    self.label6.text = [NSString stringWithFormat:@"开始时间 %@",model.businessBeginTime];
    [self.label6 addAttributes:TextAttrCorlor(Color333) forString:model.businessBeginTime];
    self.label7.text = [NSString stringWithFormat:@"结束时间 %@",model.businessEndTime];
    [self.label7 addAttributes:TextAttrCorlor(Color333) forString:model.businessEndTime];


    self.label8.text = [NSString stringWithFormat:@"应付金额 %@",[NSString toTen:model.compulsoryPrice]];
    [self.label8 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:[NSString toTen:model.compulsoryPrice]];
    
    
    if ([model.compulsoryPaidAmount doubleValue] > 0) {
        self.label9.text = [NSString stringWithFormat:@"实付金额 %@",[NSString toTen:model.compulsoryPaidAmount]];
        [self.label9 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:[NSString toTen:model.compulsoryPaidAmount]];
    }
    else {
        self.label9.text = [NSString stringWithFormat:@"实付金额 -"];
        [self.label9 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:@"-"];
    }
    
    

    
    self.label10.text = [NSString stringWithFormat:@"应付金额 %@",[NSString toTen:model.businessPrice]];
    [self.label10 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:[NSString toTen:model.businessPrice]];

    
    if ([model.businessPaidAmount doubleValue] > 0) {
        self.label11.text = [NSString stringWithFormat:@"实付金额 %@",[NSString toTen:model.businessPaidAmount]];
        [self.label11 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:[NSString toTen:model.businessPaidAmount]];
    }
    else {
        self.label11.text = @"实付金额 -";
        [self.label11 addAttributes:TextAttrCorlor(ColorWithFF921C) forString:@"-"];
    }
    


}
@end
